(basic-save-buffer): Cal auto-save-mode with t as arg
authorRichard M. Stallman <rms@gnu.org>
Thu, 10 Jun 1993 23:35:18 +0000 (23:35 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 10 Jun 1993 23:35:18 +0000 (23:35 +0000)
if and only if auto save was off and default is on.
(set-visited-file-name): Likewise.

lisp/files.el

index 047bea3c2df1614b62133c2af1071cfe1e20a823..9cce40b601753df78a115a9fb8b02244027d5e6b 100644 (file)
@@ -1086,7 +1086,8 @@ if you wish to pass an empty string as the argument."
         (setq backup-inhibited t)))
   ;; If auto-save was not already on, turn it on if appropriate.
   (if (not buffer-auto-save-file-name)
-      (auto-save-mode (and buffer-file-name auto-save-default))
+      (and buffer-file-name auto-save-default
+          (auto-save-mode t))
     ;; If auto save is on, start using a new name.
     ;; We deliberately don't rename or delete the old auto save
     ;; for the old visited file name.  This is because perhaps
@@ -1381,7 +1382,8 @@ the last real save, but optional arg FORCE non-nil means delete anyway."
              (setq buffer-file-name
                    (expand-file-name (read-file-name "File to save in: ") nil)
                    default-directory (file-name-directory buffer-file-name))
-             (auto-save-mode auto-save-default)))
+             (and auto-save-default (not buffer-auto-save-file-name)
+                  (auto-save-mode t))))
        (or (verify-visited-file-modtime (current-buffer))
            (not (file-exists-p buffer-file-name))
            (yes-or-no-p